package com.wss.module.market.ui.goods.cart.adapter;

import com.wss.common.base.adapter.BaseListAdapter;
import com.wss.common.base.adapter.listener.OnListItemClickListener;
import com.wss.common.base.adapter.superadapter.SuperViewHolder;
import com.wss.common.utils.ImageUtils;
import com.wss.module.market.ResourceTable;
import com.wss.module.market.bean.GoodsInfo;
import ohos.app.Context;
import org.jetbrains.annotations.NotNull;

import java.util.List;

public class OrderSettlementGoodsInfoAdapter extends BaseListAdapter<GoodsInfo> {
    /**
     * 常规列表重写该方法
     *
     * @param context     context
     * @param list        数据源
     */
    public OrderSettlementGoodsInfoAdapter(Context context, List<GoodsInfo> list) {
        super(context,
                list,
                ResourceTable.Layout_market_item_of_order_goods_info,
                null);
    }

    @Override
    public void onBindData(@NotNull SuperViewHolder holder, int layoutPosition, @NotNull GoodsInfo data) {
        ImageUtils.loadImage(holder.findViewById(ResourceTable.Id_iv_goods), data.getGoodsMasterImg());
    }
}
